<template>
  <view class="content">
    <u-swiper
      :list="detail.images"
      indicator
      height="375"
      indicatorMode="line"
      circular
      style="border-radius: 0px"
    ></u-swiper>
    <view class="list-item">
      <view class="title">
        {{detail.title}}
        <text class="time" v-if="detail.hour < 24">{{detail.hour}}小时前</text>
		<text class="time" v-else>{{detail.day}}天前</text>
      </view>

      <text class="weight">{{detail.num}}吨</text>
      <p>规格：{{detail.sku}}</p>
      <p>收货地：{{detail.address}}</p>

      <p>
        {{detail.remark}}
      </p>
    </view>

    <view class="footer">
      <u-button
        @click="go"
        color="linear-gradient(90deg, #0096FF 0%, #003DB1 100%)"
        class="hande"
        >去报价</u-button
      >
    </view>
  </view>
</template>
<script>
export default {
  name: "index",
  components: {},
  data() {
    return {
      list3: [require("@/static/images/delete/st.jpg")],
	  id:0,
	  detail:[]
    };
  },
  onLoad(e) {
  	if(e.id){
		this.id = e.id
	}
	this.getdetail()
  },
  methods: {
		getdetail(){
			var that = this
			this.$.ajax(1,'POST','/index/getpurchasedetail',{
				id:this.id
			},(res)=>{
				that.detail = res.data.detail
			})
		},
		go() {
		  uni.navigateTo({ url: "/pages/buy/quoteNow?id="+this.id });
		},
  },
  created() {},
  mounted() {},
};
</script>
<style lang="scss" scoped>
body {
  background-color: #fff;
}

.content {
  .list-item {
    padding: 34rpx 30rpx 140rpx;
    display: flex;
    flex-direction: column;
    gap: 20rpx;
    color: #666666;
    font-size: 28rpx;
    p {
      font-family: PingFang SC;
      font-size: 32rpx;
      font-weight: 400;
      line-height: 44rpx;
      text-align: left;
    }

    .title {
      font-size: 32rpx;
      display: flex;
      font-weight: 700;
      align-items: center;
      justify-content: space-between;
      color: #131313;
      gap: 20rpx;
      .time {
        font-weight: 500;
      }
    }

    .weight {
      color: #ff4435;
      font-size: 24rpx;
      font-weight: 500;
      line-height: 30rpx;
      text-align: left;
    }

    .time {
      color: #999999;
      flex: 1;
      font-weight: 400;
      text-align: right;
      font-size: 28rpx;
    }

    .tag {
      gap: 20rpx;
    }

    .price {
      display: flex;
      align-items: end;
      gap: 20rpx;

      .num {
        color: #686868;
        font-size: 20rpx;
        font-weight: 400;
        margin-bottom: 4rpx;
      }

      .money {
        font-weight: 700;

        text {
          font-size: 40rpx;
          font-weight: 500;
        }
      }
    }

    img {
      width: 200rpx;
      height: 200rpx;
    }
  }

  .footer {
    padding: 20rpx;
    position: fixed;
    bottom: 0;
    width: 100%;

    .hande {
      color: #ffffff;
      border-radius: 12rpx;
      font-size: 26rpx;
    }
  }
}
</style>

